//
//  CLLrcLabel.swift
//  iPhone
//
//  Created by Toj on 3/5/24.
//

import UIKit

class CLLrcLabel: UILabel {

    var progress: CGFloat = 0 { didSet {
        setNeedsDisplay()
    } }

    override func draw(_ rect: CGRect) {
        super.draw(rect)
        
        UIColor.green.set()
        
        let width = bounds.size.width * progress
        let fillRect = CGRect(x: 0, y: 0, width: width, height: bounds.size.height)
        UIRectFillUsingBlendMode(fillRect, .sourceIn)
        
    }
}
